package demo.axitdn.physic;

public class FixedAxis implements Force {

	private State state;
	private LinearMotion lm;
	private Vector3f o;
	private float R;
	private Vector3f tA;
	private Vector3f phiP;
	private Vector3f wV;

	public FixedAxis(State state, LinearMotion lm, Vector3f o, float r) {
		this.state = state;
		this.lm = lm;
		this.o = o;
		R = r;

		state.position = state.position.addLocal(o);
	}

	@Override
	public Vector3f ff(State state, double t) {
		// TODO Auto-generated method stub
		return new Vector3f();
	}

	@Override
	public void update(State state) {
		// TODO Auto-generated method stub
		phiP = lm.getS();
		wV = lm.getV();
		float phi = phiP.length();
		float w = wV.length();
		this.state.position.x = o.x + (float) (R * Math.cos(phi));
		this.state.position.y = o.y + (float) (R * Math.sin(phi));
	}

}
